﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Diagnostics;

namespace Jet.Dal.EF.Tests.DataObjects
{
	/// <summary>
	/// Information about employee territories from Northwind database
	/// </summary>
	[DebuggerDisplay("{EmployeeID} - {TerritoryID}")]
	[Table("EmployeeTerritories")]
	public class EmployeeTerritories
	{
		[Key, Column(Order = 1)]
		public int EmployeeID { get; set; }

		[Key, Column(Order = 2)]
		public string TerritoryID { get; set; }

		[ForeignKey("EmployeeID")]
		public virtual Employee Employee { get; set; }

		[ForeignKey("TerritoryID")]
		public virtual Territories Territory { get; set; }
	
		public override string ToString()
		{
			return string.Format("EmployeeTerritory: EmployeeID='{0}', TerritoryID ='{1}'", EmployeeID, TerritoryID);
		}
	}
}
